package com.lagou.module2homewor;

/**
 * 上网套餐类
 */
public class InternetPlan extends BasicPlan implements OnlineInterface{
    //上网流量
    private int interFlow;
    //每月咨费
    private int monthlyMoney;

    //重写打印套餐信息方法
    @Override
    public void show(){
        System.out.println("上网套餐,上网流量是:"+interFlow+"G"+",每月咨费是:"+monthlyMoney+"元");
    }

    public InternetPlan() {

    }

    public InternetPlan(int interFlow, int monthlyMoney) {
        this.interFlow = interFlow;
        this.monthlyMoney = monthlyMoney;
    }

    public int getInterFlow() {
        return interFlow;
    }

    public void setInterFlow(int interFlow) {
        this.interFlow = interFlow;
    }

    public int getMonthlyMoney() {
        return monthlyMoney;
    }

    public void setMonthlyMoney(int monthlyMoney) {
        this.monthlyMoney = monthlyMoney;
    }

    /**
     * 实现上网服务
     * @param interFlow 上网流量
     * @param iphoneCard 手机类
     */
    @Override
    public void online(int interFlow, IphoneCard iphoneCard) {
        System.out.println("手机卡: "+iphoneCard.getCardNo()+"上网花费了"+interFlow+"G流量!!");
    }
}
